import java.util.Arrays;

/**
 * @ClassName LC3194
 * @Author ykx
 * @Date 2024/6/30 14:24
 * @Version 1.0
 */
public class LC3194 {

    public static void main(String[] args) {

    }

    public double minimumAverage(int[] nums) {
        double min = Double.MAX_VALUE;
        Arrays.sort(nums);
        for (int i = 0; i < nums.length; i++) {
            min = Math.min(min, (nums[i] + nums[nums.length - 1 - i]) * 1.0 / 2);
        }
        return min;
    }

}
